*Replikationssyntax f�r Mader & Schoen 2013, ZIB

clear
set more off, permanently

*�ffnen des Datensatzes: GLES 2011 Langfrist-Online-Tracking, T14, ZA5347, Version 1.0.0
use "...ZA5347_v1-0-0_numlabel.dta"


**AV
*Zustimmung zu Bundeswehreinsatz in Libyen
generate Libyen_weich_11er = T14_004_S2
mvdecode Libyen_weich_11er, mv(98 = .a \ 99 = .b \ 100 = .d \ 110 = .c)
label variable Libyen_weich_11er "Unterst�tzung Libyen-Einsatz, weicher Frame"
label define Libyen_weich_11er_lb 1 "lehne Einsatz voll und ganz ab" 11 "bef�rworte Einsatz voll und ganz"
label val Libyen_weich_11er Libyen_weich_11er_lb

generate Libyen_neutr_11er = T14_004_S1
mvdecode Libyen_neutr_11er, mv(98 = .a \ 99 = .b \ 100 = .d \ 110 = .c)
label variable Libyen_neutr_11er "Unterst�tzung Libyen-Einsatz, neutraler Frame"
label define Libyen_neutr_11er_lb 1 "lehne Einsatz voll und ganz ab" 11 "bef�rworte Einsatz voll und ganz"
label val Libyen_neutr_11er Libyen_neutr_11er_lb

generate Libyen_hart_11er = T14_004_S3
mvdecode Libyen_hart_11er, mv(98 = .a \ 99 = .b \ 100 = .d \ 110 = .c)
label variable Libyen_hart_11er "Unterst�tzung Libyen-Einsatz, harter Frame"
label define Libyen_hart_11er_lb 1 "lehne Einsatz voll und ganz ab" 11 "bef�rworte Einsatz voll und ganz"
label val Libyen_hart_11er Libyen_hart_11er_lb

mvencode Libyen_hart_11er Libyen_weich_11er Libyen_neutr_11er, mv(.d = 0)
gen Libyen_11er_aggr = Libyen_hart_11er+Libyen_weich_11er+Libyen_neutr_11er
mvdecode Libyen_hart_11er Libyen_weich_11er Libyen_neutr_11er, mv(0 = .d)
label variable Libyen_11er_aggr "Zustimmung Libyen-Einsatz, 11er Skala"
label define Libyen_11er_aggr_lb 1 "lehne Einsatz voll und ganz ab" 11 "bef�rworte Einsatz voll und ganz"
label val Libyen_11er_aggr Libyen_11er_aggr_lb

**UVs
*Treatment-Dummies
recode T14_004_S2 (1 2 3 4 5 6 7 8 9 10 11 98 99 = 1) (100 110 = 0), gen (treat_weich)
label variable treat_weich "weiches Treatment"
label define treat_weich_lb 1 "weicher Frame" 0 "nicht weicher Frame"
label val treat_weich treat_weich_lb

recode T14_004_S1 (1 2 3 4 5 6 7 8 9 10 11 98 99 = 1) (100 110 = 0), gen (treat_neutr)
label variable treat_neutr "neutrales Treatment"
label define treat_neutr_lb 1 "neutraler Frame" 0 "nicht neutraler Frame"
label val treat_neutr treat_neutr_lb

recode T14_004_S3 (1 2 3 4 5 6 7 8 9 10 11 98 99 = 1)  (100 110 = 0), gen (treat_hart)
label variable treat_hart "hartes Treatment"
label define treat_hart_lb 1 "harter Frame" 0 "nicht harter Frame"
label val treat_hart treat_hart_lb

*Index: Militarismus
generate mili1 = T14_002a
mvdecode mili1, mv(98 = .a \ 99 = .b \ 110 = .c)
generate mili2 = T14_002f
mvdecode mili2, mv(98 = .a \ 99 = .b \ 110 = .c)

recode mili1 (1=5)(2=4)(3=3)(4=2)(5=1)
egen mili = rowmean(mili1 mili2)
label variable mili "Pazifismus-Militarismus Index"
label define mili 1 "Pazifist" 5 "Militarist"
label val mili mili_lb

*Index: Multilateralismus
generate multi1 = T14_002d
mvdecode multi1, mv(98 = .a \ 99 = .b \ 110 = .c)
generate multi2 = T14_002g
mvdecode multi2, mv(98 = .a \ 99 = .b \ 110 = .c)

recode multi2 (1=5)(2=4)(3=3)(4=2)(5=1)
egen multi = rowmean(multi1 multi2)
label variable multi "Unilateralismus-Multilateralismus Index"
label define multi 1 "Unilateralist" 5 "Multilateralist"
label val multi multi _lb

*Index: Atlantizismus
generate atla1 = T14_002c
mvdecode atla1, mv(98 = .a \ 99 = .b \ 110 = .c)
generate atla2 = T14_002h
mvdecode atla2, mv(98 = .a \ 99 = .b \ 110 = .c)

recode atla2 (1=5)(2=4)(3=3)(4=2)(5=1)
egen atla = rowmean(atla1 atla2)
label variable atla "Atlantizismus Index"
label define atla 1 "kein Atlantizist" 5 "Atlantizist"
label val atla atla_lb

*Reliabilit�tstests der Indizes (vgl. Appendix)
alpha mili1 mili2
alpha multi1 multi2
alpha atla1 atla2

*Internationalismus
generate inter2 = T14_002e
mvdecode inter2, mv(98 = .a \ 99 = .b \ 110 = .c)

label variable inter2 "Isolationismus-Internationalismus"
label define inter2 1 "Isolationist" 5 "Internationalist"
label val inter2 inter_lb

*Links-Rechts Dimension
generate lire = A33
mvdecode lire, mv(98 = .a \ 99 = .b \ 110 = .c)
label variable lire "Links-Rechts Orientierung"
label define lire_lb 1 "links" 11 "rechts"
label val lire lire_lb

*Regierungs-PI Dummy
recode A36 (2 3 5 = 1) (4 6 7 801 808 997 = 0) (999 = .b) (1010 = .c), gen(pi_gov_dummy)
label variable pi_gov_dummy "Identifikation mit einer der Regierungsparteien"
label define pi_gov_dummy 1 "Identifizierer" 0 "kein Identifizierer"
label val pi_gov_dummy pi_gov_dummy
tab1 pi_gov_dummy

*spez. Interesse
generate int1 = T14_001
recode int1 (1=5)(2=4)(3=3)(4=2)(5=1)
mvdecode int1, mv(99 = .b \ 110 = .c)
label variable int1 "themenspezifisches Interesse"
label define int1_lb 1 "ueberhaupt nicht interessiert" 5 "sehr strark interessiert"
label val int1 int1_lb

*Bildung Dummy
recode v_03 (5=1) (1 2 3 4 6 = 0) (110 = 110), gen(edu_h_dummy)
mvdecode edu_h_dummy, mv(110 = .c)
label variable edu_h_dummy "Abitur Dummy"
label define edu_h_dummy_lb 1 "Abitur" 0 "kein Abitur"
label val edu_h_dummy edu_h_dummy_lb

*Alter
gen age = 2011 - v_02 
recode age (-7999 = 110)
mvdecode age, mv(110 = .c)

*Geschlecht
recode v_01 (2 = 1) (1 = 0) (110 = 110), gen(female) 
mvdecode female, mv(110 = .c)
label define female_lb 0 "m�nnlich" 1 "weiblich"
label val female female_lb

*Herkunft
recode A45 (3 = 1) (2 4 7 12 16 17 18 19 20 21 = 0) (99 = 99) (110 = 110), gen(ost)
mvdecode ost, mv(99 = .b \ 110 = .c)
tab1 ost, mis


**Korrektur des Wertebereichs auf 0-1
foreach var of varlist mili inter2 multi atla int1 {
gen `var'_r = (`var' - 1)/4
}

foreach var of varlist Libyen_weich_11er Libyen_neutr_11er Libyen_hart_11er Libyen_11er_aggr lire {
gen `var'_r = (`var' - 1)/10
}

gen age_r = (age - 18)/72
gen treat_hart_r = treat_hart
gen treat_weich_r = treat_weich
gen pi_gov_dummy_r = pi_gov_dummy
gen edu_h_dummy_r = edu_h_dummy
gen female_r = female
gen ost_r = ost

**Zentrierung
foreach var of varlist Libyen_11er_aggr_r treat_hart_r treat_weich_r mili_r inter2_r multi_r atla_r lire_r pi_gov_dummy_r int1_r edu_h_dummy_r age_r female_r ost_r {
sum `var', meanonly
gen `var'_c = `var' - r(mean)
}

**Interaktionsterme
foreach var of varlist mili_r_c inter2_r_c multi_r_c atla_r_c lire_r_c pi_gov_dummy_r_c age_r_c int1_r_c edu_h_dummy_r_c female_r_c ost_r_c {
gen `var'_trea_w_r_c = `var'*treat_weich_r_c
}





**ANALYSEN

*Teilnehmerzahl und Sozialstruktur nach Fragebogenversion (Tabelle 2)

gen treat = .
replace treat = 1 if treat_weich == 1
replace treat = 2 if treat_neutr == 1
replace treat = 3 if treat_hart == 1
label variable treat "erhaltenes Treatment"
label define treat_lb 1 "weicher Frame" 2 "neutraler Frame" 3 "harter Frame"
label val treat treat_lb

sort treat
by treat: tab1 v_01
tabulate treat v_01, chi V

sort treat
by treat: sum age
anova treat age

sort treat
by treat: tab1 edu_h_dummy
tabulate treat edu_h_dummy, chi V




*Theoret. relevante Variablen nach Fragebogenversion (Tabelle 3)
table treat, c(mean mili_r)
anova mili_r treat
ttest mili_r if treat !=3, by(treat)
ttest inter2_r, by(treat_weich)

table treat, c(mean inter2_r)
anova inter2_r treat
ttest inter2_r if treat !=1, by(treat)
ttest inter2_r, by(treat_weich)

table treat, c(mean multi_r)
anova multi_r treat
ttest multi_r if treat !=1, by(treat)
ttest multi_r, by(treat_weich)

table treat, c(mean atla_r)
anova atla_r treat

table treat, c(mean lire_r)
anova lire_r treat

table treat, c(mean pi_gov_dummy_r)
anova pi_gov_dummy_r treat

table treat, c(mean int1_r)
anova int1_r treat

table treat, c(mean age)
anova age treat

table treat, c(mean edu_h_dummy_r)
anova edu_h_dummy_r treat if treat
ttest edu_h_dummy_r if treat !=3, by(treat)
ttest edu_h_dummy_r, by(treat_weich)

table treat, c(mean female_r)
anova female_r treat
ttest multi_r if treat !=3, by(treat)
ttest multi_r, by(treat_weich)

table treat, c(mean ost_r)
anova ost_r treat
ttest multi_r if treat !=1, by(treat)
ttest multi_r, by(treat_weich)


**Mittelwertvergleich der Libyen-Items (Tabelle 4)
tab1 Libyen_hart_11er_r Libyen_weich_11er_r Libyen_neutr_11er_r
sum Libyen_hart_11er_r Libyen_neutr_11er_r Libyen_weich_11er_r
table treat, c(mean Libyen_11er_aggr_r)
ttest Libyen_11er_aggr_r if treat !=1, by(treat) unequal
ttest Libyen_11er_aggr_r if treat !=3, by(treat) unequal


**Regressionsmodell (Tablle 5)
reg Libyen_11er_aggr_r treat_weich_r_c mili_r_c mili_r_c_trea_w_r_c inter2_r_c inter2_r_c_trea_w_r_c multi_r_c multi_r_c_trea_w_r_c atla_r_c atla_r_c_trea_w_r_c ///
pi_gov_dummy_r_c pi_gov_dummy_r_c_trea_w_r_c lire_r_c lire_r_c_trea_w_r_c ///
int1_r_c int1_r_c_trea_w_r_c age_r_c age_r_c_trea_w_r_c edu_h_dummy_r_c edu_h_dummy_r_c_trea_w_r_c female_r_c female_r_c_trea_w_r_c ost_r_c ost_r_c_trea_w_r_c
estat vif, uncentered

**Marginale Effekte f�r die Auspr�gungen -2 bis 2 Standardabweichungen der Interaktionsvariablen (Abbildung 1)
lincom treat_weich_r_c + -2*.2889032*mili_r_c_trea_w_r_c
lincom treat_weich_r_c + -1.5*.2889032*mili_r_c_trea_w_r_c
lincom treat_weich_r_c + -1*.2889032*mili_r_c_trea_w_r_c
lincom treat_weich_r_c + -0.5*.2889032*mili_r_c_trea_w_r_c
lincom treat_weich_r_c + 0*.2889032*mili_r_c_trea_w_r_c
lincom treat_weich_r_c + 0.5*.2889032*mili_r_c_trea_w_r_c
lincom treat_weich_r_c + 1*.2889032*mili_r_c_trea_w_r_c
lincom treat_weich_r_c + 1.5*.2889032*mili_r_c_trea_w_r_c
lincom treat_weich_r_c + 2*.2889032*mili_r_c_trea_w_r_c

lincom treat_weich_r_c + -2*.2884191*inter2_r_c_trea_w_r_c
lincom treat_weich_r_c + -1.5*.2884191*inter2_r_c_trea_w_r_c
lincom treat_weich_r_c + -1*.2884191*inter2_r_c_trea_w_r_c
lincom treat_weich_r_c + -0.5*.2884191*inter2_r_c_trea_w_r_c
lincom treat_weich_r_c + 0*.2884191*inter2_r_c_trea_w_r_c
lincom treat_weich_r_c + 0.5*.2884191*inter2_r_c_trea_w_r_c
lincom treat_weich_r_c + 1*.2884191*inter2_r_c_trea_w_r_c
lincom treat_weich_r_c + 1.5*.2884191*inter2_r_c_trea_w_r_c
lincom treat_weich_r_c + 2*.2884191*inter2_r_c_trea_w_r_c

lincom treat_weich_r_c + -2*.2884191*inter2_r_c_trea_w_r_c
lincom treat_weich_r_c + -1.5*.2884191*inter2_r_c_trea_w_r_c
lincom treat_weich_r_c + -1*.2884191*inter2_r_c_trea_w_r_c
lincom treat_weich_r_c + -0.5*.2884191*inter2_r_c_trea_w_r_c
lincom treat_weich_r_c + 0*.2884191*inter2_r_c_trea_w_r_c
lincom treat_weich_r_c + 0.5*.2884191*inter2_r_c_trea_w_r_c
lincom treat_weich_r_c + 1*.2884191*inter2_r_c_trea_w_r_c
lincom treat_weich_r_c + 1.5*.2884191*inter2_r_c_trea_w_r_c
lincom treat_weich_r_c + 2*.2884191*inter2_r_c_trea_w_r_c

lincom treat_weich_r_c + -2*.2305065*multi_r_c_trea_w_r_c
lincom treat_weich_r_c + -1.5*.2305065*multi_r_c_trea_w_r_c
lincom treat_weich_r_c + -1*.2305065*multi_r_c_trea_w_r_c
lincom treat_weich_r_c + -0.5*.2305065*multi_r_c_trea_w_r_c
lincom treat_weich_r_c + 0*.2305065*multi_r_c_trea_w_r_c
lincom treat_weich_r_c + 0.5*.2305065*multi_r_c_trea_w_r_c
lincom treat_weich_r_c + 1*.2305065*multi_r_c_trea_w_r_c
lincom treat_weich_r_c + 1.5*.2305065*multi_r_c_trea_w_r_c
lincom treat_weich_r_c + 2*.2305065*multi_r_c_trea_w_r_c

lincom treat_weich_r_c + -1*.2164632*atla_r_c_trea_w_r_c
lincom treat_weich_r_c + -0.5*.2164632*atla_r_c_trea_w_r_c
lincom treat_weich_r_c + 0*.2164632*atla_r_c_trea_w_r_c
lincom treat_weich_r_c + 0.5*.2164632*atla_r_c_trea_w_r_c
lincom treat_weich_r_c + 1*.2164632*atla_r_c_trea_w_r_c
lincom treat_weich_r_c + 1.5*.2164632*atla_r_c_trea_w_r_c
lincom treat_weich_r_c + 2*.2164632*atla_r_c_trea_w_r_c
lincom treat_weich_r_c + 2.5*.2164632*atla_r_c_trea_w_r_c
lincom treat_weich_r_c + 3*.2164632*atla_r_c_trea_w_r_c

lincom treat_weich_r_c + -2*.2330019*lire_r_c_trea_w_r_c
lincom treat_weich_r_c + -1.5*.2330019*lire_r_c_trea_w_r_c
lincom treat_weich_r_c + -1*.2330019*lire_r_c_trea_w_r_c
lincom treat_weich_r_c + -0.5*.2330019*lire_r_c_trea_w_r_c
lincom treat_weich_r_c + 0*.2330019*lire_r_c_trea_w_r_c
lincom treat_weich_r_c + 0.5*.2330019*lire_r_c_trea_w_r_c
lincom treat_weich_r_c + 1*.2330019*lire_r_c_trea_w_r_c
lincom treat_weich_r_c + 1.5*.2330019*lire_r_c_trea_w_r_c
lincom treat_weich_r_c + 2*.2330019*lire_r_c_trea_w_r_c

lincom treat_weich_r_c + -.2179276*pi_gov_dummy_r_c_trea_w_r_c
lincom treat_weich_r_c + .7820724*pi_gov_dummy_r_c_trea_w_r_c


*Direkte Framing-Effekte zum Thema Libyen-Einsatz (Fu�note 21)
reg Libyen_11er_aggr_r treat_weich_r treat_hart_r
*leichte Abweichung von berichtetem t-Wert des Mittel-Frames
